import { WebInfo, SiteConfig } from "@/api/webInfo/types";
import { WebState } from "../types";

const useWebStore = defineStore("useWebStore", {
  state: (): WebState => ({
    webInfo: {
      siteConfig: {} as SiteConfig,
    } as WebInfo,
  }),
  actions: {
    setWebInfo(webInfo: WebInfo) {
      this.webInfo = webInfo;
    },
  },
  getters: {},
  persist: {
    key: "web",
    storage: sessionStorage,
  },
});

export default useWebStore;
